/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author luan
 */
public class doctor {
    String code;
    String name;
    String dept;
    int year; // number of year worked
    //Constructor
    public doctor()
    {
        code="";
        name="";
        dept="";
        year=0;
    }
    public doctor(String code,String name,String dept,int year)
    {
        this.code=code;
        this.name=name;
        this.dept=dept;
        this.year=year;
    }
    //Setter
    public void setCode(String code)
    {
        this.code=code;
    }
    public void setName(String name)
    {
        this.name=name;
    }
    public void setDept(String Dept)
    {
        this.dept=Dept;
    }
    public void setYear(int year)
    {
    this.year=year;
    }
    //Getter
    public String getCode()
    {
        return this.code;
    }
    public String getName()
    {
        return this.name;
    }
    public String getDept()
    {
       return this.dept;
    }
    public int getYear()
    {
        return this.year;
    }
    @Override
    public String toString()
    {
        String S;
        S="\nCode: "+code+"\nName: "+name+"\nDept: "+dept+"\nYear worked: "+year;
        return S;
    }
}
